package com.example.mybatisplus.web.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.mybatisplus.model.dto.PageDTO;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.example.mybatisplus.common.JsonResponse;
import com.example.mybatisplus.service.AuditHistoryService;
import com.example.mybatisplus.model.domain.AuditHistory;


/**
 *
 *  前端控制器
 *
 *
 * @author lxp
 * @since 2023-01-05
 * @version v1.0
 */
@Controller
@RequestMapping("/api/auditHistory")
public class AuditHistoryController {

    private final Logger logger = LoggerFactory.getLogger( AuditHistoryController.class );

    @Autowired
    private AuditHistoryService auditHistoryService;


    @GetMapping("list")
    @ResponseBody
    public JsonResponse list(AuditHistory auditHistory, PageDTO pageDTO){
        Page<AuditHistory> page = auditHistoryService.pageList(auditHistory, pageDTO);
        return JsonResponse.success(page);
    }
}

